package com.zhongke.cotrun.service.impl;

import com.zhongke.cotrun.mapper.UserAllIntegralMapper;
import com.zhongke.cotrun.model.pojo.UserAllIntegral;
import com.zhongke.cotrun.service.UserAllIntegralService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

@Service
public class UserAllIntegralServiceImpl implements UserAllIntegralService {
    @Autowired
    UserAllIntegralMapper userAllIntegralMapper;

    /**
     * 查看用户账户
     *
     * @param userId
     * @return
     */
    @Override
    public List<UserAllIntegral> selectUserAllIntegral(Integer userId) {


        return userAllIntegralMapper.selectUserAllIntegral(userId);
    }


    @Override
    public BigDecimal selectUserAllIntegralById(Integer userId) {
        return userAllIntegralMapper.selectUserAllIntegralValueByUserId(userId);
    }
}
